﻿<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="/static/admin/Css/public.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

	<title>文章管理</title>
</head>

<body>
<!--导航栏-->
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="border">
	<tr class="topbg"><td>文章管理</td></tr>
	<tr class="tdbg">
		<td height="30">&nbsp;&nbsp;
			<a href="{:url('admin/article/index')}">管理首页</a>&nbsp;|&nbsp;
			<a href="{:url('admin/article/add')}">添加文章</a>
		</td>
	</tr>
</table>

<!--搜索表单-->
<div style="padding:8px 5px;margin:8px 3px;background-color:#fefefe;text-align:center;">
<form name="form1" method="post" action="{:url('/admin/article/index')}">
	<span style="padding:0px 5px;">分类</span>
	<select name="category_id">
		<option value="">任意</option>
		{foreach $cate as $v}
			<option value="{$v.id}">
				<?php echo str_repeat('--',$v->level*2); ?>
				{$v.classname}
			</option>
		{/foreach}
	</select>
	<span style="padding:0px 5px;">标题</span>
	<input type="text" name="keyword" value=""/>
	<input type="submit" value="搜索" />
	<input type="hidden" name="ac" value="search" />
	<iframe name="postTo" style="display:none"></iframe>
</form>
</div>
<!--文章列表-->
<table width="100%" border="1" align="center" cellpadding="3" cellspacing="1" class="table table-bordered">
<tr class="title" align="center">
	<td>编号</td>
	<td>分类</td>
	<td>标题</td>
	<td>作者</td>
	<td>发布时间</td>
	<td>操作选项</td>
</tr>
{foreach $data as $v}
<tr class="tdbg" align="center">
	<td>{$v.id}</td>
	<td>{$v.classname}</td>
	<td align="left">
		<a target="_blank" href="{:url('index/index/content',['id'=>$v.id])}">{$v.title}</a>
		{if($v.top)}[<font color="red">顶</font>]{/if}
	</td>
	<td>{$v.name}</td>
	<td>{$v.addate|date='Y-m-d h:i:s',###}</td>
	<td>
		<a href="{:url('admin/article/edit',['id'=>$v.id])}">修改</a> |
		<a href="javascript:void(0)" onclick="if(confirm('您确定要删除吗？')) location.href= '{:url(\'admin/article/delete\',[\'id\'=>$v.id])}'">删除</a>
	</td>
</tr>
{/foreach}


<!--文章分页-->
<tr class="tdbg">
	<td colspan="7" align="center">{$data->render()}</td>
</tr>
</table>
</body>
</html>